<template>
    <a-modal title="批量增加项" v-model="show" @ok="handleOk" @cancel="handleCancel">
        <a-form-model :label-col="labelCol" :wrapper-col="wrapperCol">
            <a-form-model-item label="新增项数量">
                <a-input v-model="termNum" />
            </a-form-model-item>
        </a-form-model>
        <template slot="footer">
            <a-button @click="handleCancel">返回</a-button>
            <a-button type="primary" @click="handleOk" >确认</a-button>
        </template>
    </a-modal>
</template>

<script>
export default {
    props: ['show', "btnShow"],
    data() {
        return {
            labelCol: { span: 4 },
            wrapperCol: { span: 14 },
            termNum: 1,//新增项数量
        }
    },
    methods: {
        //提交项
        handleOk() {
            this.$emit('addTerm', this.termNum);
            
        },

        //关闭弹窗
        handleCancel() {
            this.$emit('update:show', false)
            this.termNum = 1
        },
    }
}
</script>

<style lang="less" scoped></style>